package com.jlkf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jlkf.service.SysRoleService;

@Controller
@RequestMapping("role")
public class SysRoleController {

	@Autowired
	private SysRoleService sysRoleService;
	
	@RequestMapping("getList")
	public Object getList(Integer pageNumber,Integer pageSize,String name){
		return sysRoleService.getList(pageNumber, pageSize, name);
	}
	
	@RequestMapping("addOrUpdate")
	@ResponseBody
	public Object addOrUpdateRole(@RequestBody String json){
		return sysRoleService.addOrUpdateRole(json);
	}
	
	@RequestMapping("delete")
	public Object deleteRole(Long id){
		return sysRoleService.deleteRole(id);
	}
}
